exports.updatePass = function (req, res) {

    //获取参数信息
    var bodyParams = req.routeInfo.bodyParams;

    //查询原密码是否正确
    function searchOldPassWord(cb){

        R.SEND_HTTP(
            req,
            res,
            {
                url: CORE_APIConfig.coreAPI.userSearch.Request_Api_Url + "/u_id/" + bodyParams.u_id + "/u_password/" + bodyParams.u_old_password,
                method : 'GET'  
            },
            function(data){

                if(data.result.data.length <= 0){
                    return RES.errorResponse(res,"抱歉，原密码不正确");
                }

                cb();

            }
        )
    }

    //更新用户密码
    function updatePassWord(cb){

        R.SEND_HTTP(
            req,
            res,
            {
                url: CORE_APIConfig.coreAPI.userUpdate.Request_Api_Url,
                method : 'POST',
                data : {
                    update_where : "u_id",
                    u_password   : bodyParams.u_new_password,
                    u_id         : bodyParams.u_id
                }  
            },
            function(data){

                cb();

            }
        )


    }

    F.Serial([searchOldPassWord,updatePassWord],function(){

        RES.successResponse(res);

    });


}